# coding=utf-8
# 全世界最帅的帅哥
from flask import Blueprint
from flask_restful import Api

from .category_domain import SubjectCategoryResource
from .label_domain import LabelResource
from .liked_domain import SubjectLikedResource
from .subject_domain import SubjectResource

subject_bp = Blueprint("subject", __name__, url_prefix='/subject')

subject_api = Api(subject_bp)

subject_api.add_resource(SubjectCategoryResource, '/category', "/category/<int:category_id>",
                         "/category/<string:action>", endpoint='category')
subject_api.add_resource(LabelResource, '/label', "/label/<int:label_id>", "/label/<string:action>", endpoint='label')
subject_api.add_resource(SubjectResource, '/subject', "/subject/<int:subject_id>", "/subject/<string:action>",
                         endpoint='subject')
subject_api.add_resource(SubjectLikedResource, '/liked', "/liked/<string:action>", endpoint='liked')
